﻿@using Utils
@model PH.Model.Analyses.Schools.S4StudentCollection
<div class="row" style="margin-top: 20px; font-family: 微软雅黑">
    @{
        if (Model.TotalRecordsCount > 0)
        {
            foreach (var item in Model)
            {
                <div class="span6">
                    <div style="background: url(/content/images/portal/stuseatop.png) repeat-x; padding-top: 35px">
                        <div style="background: #e9e0d3; padding: 0px 20px 2px 20px">
                            <table class="table table-bordered">
                                <colgroup>
                                    <col style="width: 50%" />
                                    <col style="width: 15%;" />
                                    <col style="width: 15%;" />
                                    <col style="width: 15%;" />
                                </colgroup>
                                <thead style="background: #fff; color: #3f3f3f; font-size: 15px; font-weight: bold;">
                                    <tr>
                                        <th colspan="4" style="text-align: center; font-size: 24px; padding: 20px 0px">@item.SchoolName</th>
                                    </tr>
                                    <tr>
                                        <th style="text-align: center;">@item.ClassName</th>
                                        <th colspan="3" style="text-align: center;">@item.RealName</th>
                                    </tr>
                                    <tr style="background: #f5f5f5; color: #666">
                                        <th style="text-align: center;">项目</th>
                                        <th style="text-align: center;">成绩</th>
                                        <th style="text-align: center;">标准分</th>
                                        <th style="text-align: center;">附加分</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @{
                        var subjects = item.Subjects.Split('|');
                        for (var i = 0; i < subjects.Length; i++)
                        {
                            var data = subjects[i].Split('#');
                            var cla = "success";
                            switch (i % 4)
                            {
                                case 1:
                                    cla = "error";
                                    break;
                                case 2:
                                    cla = "warning";
                                    break;
                                case 3:
                                    cla = "info";
                                    break;
                                default:
                                    cla = "success";
                                    break;
                            }
                                                
                                        <tr class="@cla">
                                            <td>@data[0]</td>
                                            <td style="text-align: center">
                                                @(new string[] { "1000米跑", "800米跑" }.Contains(data[0]) ? PH.Model.Help.GetRunTime(data[1].RemoveLastZero()) : data[1].RemoveLastZero())
                                            </td>
                                            <td style="text-align: center">@data[2]</td>
                                            <td style="text-align: center">@data[3]</td>
                                        </tr>        
                        }
                                    }
                                </tbody>
                                <tfoot style="background: #fff; color: #666; font-size: 15px; font-weight: bold;">
                                    <tr>
                                        <td style="text-align: center;">标准分</td>
                                        <td colspan="3" style="text-align: center;">@item.StandardScore</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">附加分</td>
                                        <td colspan="3" style="text-align: center;">@item.AdditionalScore</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">学年总分</td>
                                        <td colspan="3" style="text-align: center;">@item.TotalScore</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">评级</td>
                                        <td colspan="3" style="text-align: center;">@(PH.Model.Help.GetScoreLevel(item.ScoreLevel))</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;">体育老师</td>
                                        <td colspan="3" style="text-align: center;">@item.TeacherName</td>
                                    </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>     
            }
        }
    }
</div>
